const mongoose = require('mongoose')

mongoose.connect(
    'mongodb://localhost/myImageUploader' , 
    {useNewUrlParser:true , useUnifiedTopology:true}
)
const connection = mongoose.connection
connection.on('connected',() => console.log('mongoose connection'))
connection.on('error',err => console.log(err))
connection.on('disconnected',() => console.log('mongoose disconnected'))

require('./image.js')
require('./comment.js')